package hr.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import hr.entity.Employee;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import hr.entity.vo.ObtainDepartment;
import hr.entity.vo.response.EmployeeVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 员工信息表 Mapper 接口
 * </p>
 *
 * @author zzh
 * @since 2023-12-04
 */
@Mapper
public interface EmployeesMapper extends BaseMapper<Employee> {
    Employee selectOneByUsernamePassword(@Param("username") String username,
                                         @Param("password") String password);

    List<?> selectAllForList();

    List<EmployeeVo> selectAllByPage(@Param("obj") ObtainDepartment obtainDepartment,@Param("name")String name,@Param("phone")String phone);

    long selectThisQueryPageCount(@Param("obj") ObtainDepartment obtainDepartment,@Param("name")String name,@Param("phone")String phone);

    int updateByEmployeeId(Employee existingEmployee);

    Integer getCount(@Param("name") String name);

    List<Map<String, Object>> selectEmployeeSexRatio();

    List<Map<String, Object>> selectEmployeeMaritalStatusRatio();

    List<Map<String, String>> selectSevenDaysInAndOut(@Param("startTime") long timeLong);
}
